home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * Copyright (c) 1989-1992 Stone Design Corp. All rights reserved.
- * programmer: Bill Bumgarner
- * File name: SD_Simple_tx.sl
- * Date: Jul 21 1992
- * Purpose: Map a texture to a surface in a simple fashion. Does
- not do lighting, so all surfaces will come out with the
- texture's colors at full intensity.
-
- Variables:
- s_frequency: # of times to repeat texture in the s direction
- t_frequency: # of times to repeat texture in the t direction
- txmap: full path to the texture map file
- ***************************************************************************/
-
- surface SD_Simple_tx(
-
- float s_frequency = 1.,
- t_frequency = 1.;
-
- string txmap = "";
-
- )
- {
- float ss = s_frequency * s;
- float tt = t_frequency * t;
-
-
- if(txmap != ""){
- Ci = color texture(txmap, ss, tt);
- } else {
- Ci = Cs;
- }
- Oi = Os;
- }